package com.example.userservice.service.Impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.common.domain.pojo.Student;
import com.example.userservice.mapper.StudentMapper;
import com.example.userservice.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class StudentServiceImpl extends ServiceImpl<StudentMapper, Student> implements StudentService {
@Autowired
private StudentMapper studentMapper;
    @Override
    public Student getStudentById(String id) {
        return studentMapper.selectOne(
                new LambdaQueryWrapper<Student>()
                        .eq(Student::getId, id)
        );
    }
}
